import React, { Component } from 'react'
import {View, StyleSheet} from 'react-native'
import * as Progress from 'react-native-progress'
import { SCREEN_HEIGHT, SCREEN_WIDTH } from '../config'

export class IRISProgress extends Component {

    constructor(props){
        super(props)
    }

    render(){
       if(this.props.isShow){
           return <View style={styles.progress}>
                        <Progress.CircleSnail size={65} 
                            indeterminate={false} 
                            color='white'
                            strokeCap = 'square'
                            thickness = {3}
                            spinDuration = {3000}
                        />
                    </View>
       }else {
           return <View/>
       }
    }
}

const styles = StyleSheet.create({
    progress: {
        position: 'absolute',
        flex: 1,
        alignItems: 'center',
        justifyContent: 'center',
        backgroundColor: 'rgba(0,0,0,0.2)',
        width: SCREEN_WIDTH,
        height: SCREEN_HEIGHT
    }
})